package com.zyh.generic;

/**
 * @Author zyh
 * @Date 2024/7/31 9:50
 * @Description 泛型
 */

public class GenericDemo1 {
    public static void main(String[] args) {
        Student<String, Integer> stu1 = new Student<>();
        Student<StringBuffer, Number> stu2 = new Student<>();
        Student<StringBuilder, Long> stu3 = new Student<>();
    }
}
class Student<A,B>{
    private A name;
    private A address;
    private B age;

    public Student() {
    }

    public Student(A name, A address, B age) {
        this.name = name;
        this.address = address;
        this.age = age;
    }
    public void setAll(A name, A address, B age){
        this.name=name;
        this.address=address;
        this.age=age;
    }
}
